/*
 *  ScalaSwingSet
 *  Copyright (c) 2008 Andy Hicks. All rights reserved.
 *  http://www.scalalabs.org
 *
 *  This software is released under the terms of the Revised BSD License.
 *  There is NO WARRANTY. See the file LICENSE for the full text.
 */
package com.scalalabs.scalaswingset


import javax.swing.border.{CompoundBorder, EmptyBorder}
import scala.swing._
import java.awt.{BorderLayout, Color}
import BorderPanel.Position._
import utils.GradientPanel
import javax.swing.UIManager

class DemoSelectorPanel(title: String) extends BorderPanel {

  val topBit = new BorderPanel() {
    layout(new TitlePanel(title)) = Center

    layout(new BoxPanel(Orientation.Horizontal ) {
      contents += new Label("View:")
      val viewComboBox = new ComboBox(List("by category"))
      contents += viewComboBox
//      border = new CompoundBorder(chiselBorder, new EmptyBorder(12,8,12,8))
    }) = South
  }

  layout(topBit) = North


  class TitlePanel(title: String) extends GradientPanel(
      Color.getHSBColor(UIManager.getColor("activeCaption").getRed -.013f, .15f, .85f),
      Color.getHSBColor(UIManager.getColor("activeCaption").getRed - .005f, .24f, .80f) ) {
    contents += new Label(title) {
      opaque = false
      horizontalAlignment = Alignment.Center
    }
  }

  class SortOptionPanel() extends BoxPanel(Orientation.Horizontal) {
    contents += new Label("View:")
    val viewComboBox = new ComboBox(List("by category"))
    contents += viewComboBox
  }
}

